//
//  CategoryModel.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/9/3.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "CategoryModel.h"

@implementation CategoryModel
-(void)setSublist:(NSArray<CategoryModel *> *)sublist{
    NSMutableArray * marr = [NSMutableArray array];
    for (NSDictionary * catDic in sublist) {
        CategoryModel * model = [[CategoryModel alloc] mj_setKeyValues:catDic];
        [marr addObject:model];
    }
    _sublist = marr;
}

-(void)setSmall_pic:(NSString *)small_pic{
    if(![[small_pic uppercaseString] containsString:@"HTTP"]){
        small_pic = [small_pic addHeader:[NSString stringWithFormat:@"%@/",host]];
    }
    _small_pic = small_pic;
}

-(void)setThumbnail_pic:(NSString *)thumbnail_pic{
    if(![[thumbnail_pic uppercaseString] containsString:@"HTTP"]){
        thumbnail_pic = [thumbnail_pic addHeader:[NSString stringWithFormat:@"%@/",host]];
    }
    _thumbnail_pic = thumbnail_pic;
}

-(void)setBig_pic:(NSString *)big_pic{
    if(![[big_pic uppercaseString] containsString:@"HTTP"]){
        big_pic = [big_pic addHeader:[NSString stringWithFormat:@"%@/",host]];
    }
    _big_pic = big_pic;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
//    NSLog(@"设置未定义的key——vale");
}
@end
